﻿<!--#include file="conn.asp"-->
<%
if request("act")="清空全部记录" then
conn.execute("delete from zjlog")
conn.close
response.redirect Request.ServerVariables("HTTP_REFERER")
response.end
end if
if request("id")="" then
response.write("<script>alert('错误:没有选定任何内容!');history.go(-1)</script>")
response.end
elseif request("act")="加入采集项目" then
id=replace(request("id")," ","")
id=replace(request("id"),",","|")
id2=Split(id,"|")
s=ubound(id2) 
for i=0 to s
id3=id3
id3=id3&i&","&trim(id2(i))&"|"
next
set rs=server.CreateObject("ADODB.RecordSet")

Sql="Select * From cjitem"
Rs.Open Sql,Conn,1,3
Rs.AddNew
rs("item")=id3
rs("startid")=0
rs("endid")=s
rs("adddate")=now()
rs.update
rs.close
response.write("<script>alert('成功：增加采集项目成功!现在返回管理');location='cjzjitem_manage.asp'</script>")
response.end
elseif request("act")="del" then
conn.execute("delete from cjitem where id in("&request("id")&")")
conn.close
response.redirect Request.ServerVariables("HTTP_REFERER")
response.end

elseif request("act")="全部删除" then
conn.execute("delete from zjlog where id in("&request("id")&")")
conn.close
set conn=nothing
response.redirect Request.ServerVariables("HTTP_REFERER")
response.end
end if
%>